import {createRouter, createWebHashHistory} from 'vue-router'
import { systemRouter } from '@/router/system'
import { playgroundRouter } from '@/router/playground'

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: '/login',
            name: 'Login',
            component: () => import('@/views/login/Login.vue')
        },
        { // 首页
            path: '/',
            name: 'Layout',
            component: () => import('@/layout/Layout.vue'),
            children: []
        }
    ]
})

// 根据权限动态加载的路由
export const childRouter = [
    ...playgroundRouter,
    ...systemRouter
]
export default router
